<template>
  <a-modal
    :title="title"
    :width="600"
    :visible="visible"
    :confirmLoading="confirmLoading"
    @ok="handleOk"
    @cancel="handleCancel"
    cancelText="关闭"
  >
    <a-spin :spinning="confirmLoading">
      <a-form :form="form">

        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="字典名称">
          <a-input autocomplete="off" placeholder="请输入字典名称" v-decorator="[ 'dictName', validatorRules.dictName]"/>
        </a-form-item>

        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="字典编码">
          <a-input autocomplete="off" placeholder="请输入字典编码" v-decorator="[ 'dictCode', validatorRules.dictCode]"/>
        </a-form-item>

        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="描述">
          <a-input autocomplete="off" v-decorator="[ 'description']"/>
        </a-form-item>

      </a-form>
    </a-spin>
  </a-modal>
</template>

<script>
  import AkfhModelMixin from '../../../mixin/AkfhModelMixin'
  import {sysDictUrl} from '../../../api/url'

  export default {
    name: 'DictModal',
    mixins:[AkfhModelMixin],
    data() {
      return {
        value: 1,
        entity:'SysDictEntity',
        validatorRules: {
          dictName: { rules: [{ required: true, message: '请输入字典名称!' }] },
          dictCode: this.getValidatorRoles().dulicateCheck
        },
        url:sysDictUrl
      }
    },
    created() {
    },
    methods: {

    }
  }
</script>